package com.cblz.bd.server.core.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cblz.bd.common.core.entity.BaAttachment;
import com.cblz.bd.server.core.entity.dto.BaAttachmentDTO;
import com.cblz.bd.server.core.event.UploadImageEventListen;
import io.vavr.Tuple3;

import java.util.Map;

/**
 * @author yanjieping
 * @description 针对表【ba_attachment(附件表)】的数据库操作Service
 * @createDate 2022-11-04 15:09:53
 */
public interface BaAttachmentService extends IService<BaAttachment> {

    /**
     * 分页查询附件表信息
     *
     * @param wrapperTuple4 分页信息和条件构造器
     * @return 分页数据
     */
    Map<String, Object> index(Tuple3<Page<BaAttachment>, QueryWrapper<BaAttachment>, BaAttachmentDTO> wrapperTuple4);

    /**
     * 保存附件信息
     *
     * @param uploadImageEventListen 图片上传监听器
     */
    void saveBaAttachment(UploadImageEventListen uploadImageEventListen);

    /**
     * 修改附件信息
     *
     * @param baAttachment 实体类
     */
    void updateBaAttachment(BaAttachment baAttachment);
}
